<template>
    <div class="dlBody">
        <!-- <transition name="fadeLeft" mode="out-in">
        <router-view style="animation-duration:0.6s;min-height:490px;"></router-view>
        </transition>-->
        <el-radio-group v-model="login">
            <!-- <el-radio-button label="login" @click.native="tologin">登陆</el-radio-button>
            <el-radio-button label="register" @click.native="toregister">注册</el-radio-button>-->
            <el-radio-button label="login">登陆</el-radio-button>
            <el-radio-button label="register">注册</el-radio-button>
        </el-radio-group>
        <router-view :from="from"></router-view>
    </div>
</template>
<script>
export default {
    data() {
        return {
            login: "login",
            from: ""
        };
    },
    methods: {
        goto() {
            if (this.login == "login") {
                this.$router.push({
                    path: "/dl/login"
                });
            } else {
                this.$router.push({
                    path: "/dl/register"
                });
            }
        }
    },
    watch: {
        login: "goto"
    },
    mounted() {
        this.from = this.$route.query.path;
    }
};
</script>
<style>
div.dlBody {
    text-align: center;
    width: 400px;
    margin-right: auto;
    margin-left: auto;
}
div.dlBody span.el-radio-button__inner {
    font-weight: 700;
    font-size: 15px;
}
</style>